import request from '@/api/request'
import { IUserInfoData } from '@/api/login_register/type'

enum API {
	REGISTER_URL = '/register', // 注册接口
	LOGIN_URL = '/login' // 登录接口
}

// 登录接口
export const reqLogin = (userInfo: IUserInfoData) => {
	return request.post(API.LOGIN_URL, userInfo)
}

// 注册接口
export const reqRegister = (userInfo: IUserInfoData) => {
	return request.post(API.REGISTER_URL, userInfo)
}
